﻿using Domain.Entities;
using FluentMigrator;
using FrameworkCore.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AiBLSmartEdu.Module.AIMedicalAssistant.API.Migrations;

[Migration(202506091820)]
public class MedicalQuestionAnswerPairsAddColumn : ForwardOnlyMigration
{
    public override void Up()
    {
        Alter.Table(MigrationExpressions.GetTableName(typeof(MedicalQuestionAnswerPairs)))
          .AddColumn(MigrationExpressions.ColumnNameFor<MedicalQuestionAnswerPairs>(nameof(MedicalQuestionAnswerPairs.Question))).AsString(int.MaxValue).Nullable().WithColumnDescription("询问的问题")
          .AddColumn(MigrationExpressions.ColumnNameFor<MedicalQuestionAnswerPairs>(nameof(MedicalQuestionAnswerPairs.Answer))).AsString(int.MaxValue).Nullable().WithColumnDescription("回复的内容")
          .AddColumn(MigrationExpressions.ColumnNameFor<MedicalQuestionAnswerPairs>(nameof(MedicalQuestionAnswerPairs.KnowledgeBase))).AsInt64().Nullable().WithColumnDescription("知识库")
          .AddColumn(MigrationExpressions.ColumnNameFor<MedicalQuestionAnswerPairs>(nameof(MedicalQuestionAnswerPairs.Dialogue))).AsInt64().Nullable().WithDefaultValue(true).WithColumnDescription("对话");
    }
}